import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;

@WebServlet(urlPatterns = "/HelloServlet")
public class HelloServlet extends HttpServlet {
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

        String isdn=request.getParameter("isdn");
        String name=request.getParameter("name");
        String author=request.getParameter("author");
        float price= Float.parseFloat(request.getParameter("price"));
        PrintWriter out = response.getWriter();

        out.println(isdn);
        out.println(name);
        out.println(author);
        out.println(price);

    }

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        PrintWriter out = response.getWriter();
        out.println("From Servlet");
    }
}
